package com.sanbi.erp.db.service;

import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import com.sanbi.erp.db.domain.Store;
import com.sanbi.erp.db.dao.StoreMapper;

import java.util.List;

@Service
public class StoreService{

    @Resource
    private StoreMapper storeMapper;

    
    public int deleteByPrimaryKey(Integer id) {
        return storeMapper.deleteByPrimaryKey(id);
    }

    
    public int insert(Store record) {
        return storeMapper.insert(record);
    }

    
    public int insertSelective(Store record) {
        return storeMapper.insertSelective(record);
    }

    
    public Store selectByPrimaryKey(Integer id) {
        return storeMapper.selectByPrimaryKey(id);
    }

    /**
     * 获取所有店铺id和名称
     * @return
     */
    public List<Store> selectListAllIdAndName() {
        return storeMapper.selectListAllIdAndName();
    }

    
    public int updateByPrimaryKeySelective(Store record) {
        return storeMapper.updateByPrimaryKeySelective(record);
    }

    
    public int updateByPrimaryKey(Store record) {
        return storeMapper.updateByPrimaryKey(record);
    }

}
